MicroWiki rowiki https://ro.micronations.wiki/wiki/Pagina_principal%C4%83 MediaWiki 1.40.0 first-letter Media Special Discuție Utilizator Discuție Utilizator MicroWiki Discuție MicroWiki Fișier Discuție Fișier MediaWiki Discuție MediaWiki Format Discuție Format Ajutor Discuție Ajutor Categorie Discuție Categorie Campaign Campaign talk TimedText TimedText talk Modul Discuție Modul Gadget Discuție Gadget Definiție gadget Discuție Definiție gadget Pagina principală 0 1 1 2022-07-27T10:19:24Z Demontux 1 wikitext text/x-wiki <strong>Programul Wiki a fost instalat.</strong> Consultați [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Ghidul utilizatorului] pentru informații despre utilizarea software-ului wiki. == Primii pași == * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Lista de setări de configurare] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Întrebări frecvente despre MediaWiki] * [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ Lista de e-mail pentru release-urile MediaWiki] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localizați MediaWiki în limba dumneavoastră] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Învățați cum să combateți spamul pe wikiul dumneavoastră] 37d468a2c63902a58008e6bba9b2b62195f2c5d3 16 1 2022-08-02T06:53:12Z AtomCZ 2273 wikitext text/x-wiki <strong>Programul Wiki a fost instalat.</strong> Consultați [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Ghidul utilizatorului] pentru informații despre utilizarea software-ului wiki. == Primii pași == * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Lista de setări de configurare] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Întrebări frecvente despre MediaWiki] * [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ Lista de e-mail pentru release-urile MediaWiki] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localizați MediaWiki în limba dumneavoastră] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Învățați cum să combateți spamul pe wikiul dumneavoastră] [[cs:Hlavní stránka]] [[de:Hauptseite]] [[en:Main Page]] [[es:Página principal]] [[fr:Accueil]] [[hi:मुखपृष्ठ]] [[pt:Página principal]] [[ja:メインページ]] [[nl:Hoofdpagina]] [[ru:Заглавная страница]] 39596f49155a89ab9af6ff5e3ba667bf3d67d187 17 16 2022-08-07T08:42:28Z AtomCZ 2273 wikitext text/x-wiki <div class="plainlinks"> <!-- BANNER ACROSS TOP OF PAGE, "WELCOME TO MICROWIKI" --> {|id="EnWpMpBook2" class="MainPageLetterHead" style="width:100%; text-align:center; clear:both; background-color: #fafafd; border: 1px solid #ccc; padding: 1px 10px 1px 10px;" |<div style="width:50%; font-size:162%; border:none; margin:0; padding:.1em; color:#000;">Bun venit la [[MicroWiki]],</div> <div style="width:50%; top:+0.2em; font-size:95%;">enciclopedia [[micronațion]]ală liberă.</div><div style="width:50%; top:+0.2em; font-size:85%;">[[Special:Statistics|{{NUMBEROFPAGES}}]] pagini in [[w:ro:română|română]]</div> |style="width:30%; font-size: 90%; vertical-align: top; text-align: right;"|{{Categorybrowsebar}} |} == Primii pași == * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Lista de setări de configurare] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Întrebări frecvente despre MediaWiki] * [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ Lista de e-mail pentru release-urile MediaWiki] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localizați MediaWiki în limba dumneavoastră] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Învățați cum să combateți spamul pe wikiul dumneavoastră] [[cs:Hlavní stránka]] [[de:Hauptseite]] [[en:Main Page]] [[es:Página principal]] [[fr:Accueil]] [[hi:मुखपृष्ठ]] [[pt:Página principal]] [[ja:メインページ]] [[nl:Hoofdpagina]] [[ru:Заглавная страница]] 237fa2b4c73d6ba1bcdc0c5304ac21a0ce537eef 19 17 2023-06-04T07:23:33Z AtomCZ 2273 wikitext text/x-wiki <div class="plainlinks"> <!-- BANNER ACROSS TOP OF PAGE, "WELCOME TO MICROWIKI" --> {|id="EnWpMpBook2" class="MainPageLetterHead" style="width:100%; text-align:center; clear:both; background-color: #fafafd; border: 1px solid #ccc; padding: 1px 10px 1px 10px;" |<div style="width:50%; font-size:162%; border:none; margin:0; padding:.1em; color:#000;">Bun venit la [[MicroWiki]],</div> <div style="width:50%; top:+0.2em; font-size:95%;">enciclopedia [[micronațion]]ală liberă.</div><div style="width:50%; top:+0.2em; font-size:85%;">[[Special:Statistics|{{NUMBEROFPAGES}}]] pagini in [[w:ro:română|română]]</div> |style="width:30%; font-size: 90%; vertical-align: top; text-align: right;"|{{Categorybrowsebar}} |} == Primii pași == * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Lista de setări de configurare] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Întrebări frecvente despre MediaWiki] * [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ Lista de e-mail pentru release-urile MediaWiki] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localizați MediaWiki în limba dumneavoastră] * [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Învățați cum să combateți spamul pe wikiul dumneavoastră] [[cs:Hlavní strana]] [[de:Hauptseite]] [[en:Main_Page]] [[es:Página principal]] [[fr:Accueil]] [[hi:मुखपृष्ठ]] [[it:Pagina principale]] [[ja:メインページ]] [[nl:Hoofdpagina]] [[pl:Strona główna]] [[pt:Página principal]] [[ru:Заглавная страница]] [[zh:首页]]] 482f5cfed0550d27a7d84d9a0a99e47e243abc9b Siliștea 0 2 2 2022-07-27T14:42:24Z StefanSNG 11599 Pagină nouă: {{Infobox settlement <!-- See Template:Infobox settlement for additional fields and descriptions --> | name = Siliștea | native_name = Сйлйштєа | native_name_lang = | settlement_type = Village | image = {{photo montage |position = center | photo1a = Siliștea photo 1.png | photo2a = Snagov Monastery photo 1.jpg | photo2b = Siliștea photo 2.jpg | photo3a = Snagovian_People's_House_-_Photo_2.jpg |... wikitext text/x-wiki {{Infobox settlement <!-- See Template:Infobox settlement for additional fields and descriptions --> | name = Siliștea | native_name = Сйлйштєа | native_name_lang = | settlement_type = Village | image = {{photo montage |position = center | photo1a = Siliștea photo 1.png | photo2a = Snagov Monastery photo 1.jpg | photo2b = Siliștea photo 2.jpg | photo3a = Snagovian_People's_House_-_Photo_2.jpg | size = 250 | color = transparent | text = <center>From left to right: Antim Ivireanu raion, [[w:ro:Mănăstirea Snagov|Snagov Monastery]], [[w:Lake Snagov|Lake Snagov]], [[w:ro:Palatul Snagov|Snagovian People's House]]<center> | border = 0 }} | image_alt = | image_flag = Flag of Siliștea.svg | flag_size = 100px | flag_alt = | image_seal = | seal_alt = | image_shield = Coat of arms of Siliștea.svg | shield_size = 100px | shield_alt = | anthem = Рѡдйна наша-й мѫндра Сйлйштє <br><small>''Patria noastră-i mândra Siliște''<br><small>[[File:Rodina nașa-i mândra Siliște - Instrumental 1.ogg]] | nickname = | motto = Славъ вєшнйкъ <br> <small> ''Glorie eternă'' <small> | image_map = Siliștea in Snagov - map.svg | map_alt = | map_caption = Siliștea (roșu) în Snagov (gri deschis) | pushpin_map = | pushpin_label_position = | pushpin_map_alt = | pushpin_map_caption = | latd = |latm = |lats = |latNS = | longd = |longm = |longs = |longEW = | coor_pinpoint = | coordinates_type = | coordinates_display = inline,title | coordinates_footnotes = | subdivision_type = Țara | subdivision_name = [[File:Flag of Snagov.svg|22px]] [[Snagov]] | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | subdivision_type3 = | subdivision_name3 = | established_title = Unirea Silișteană | established_date = 1964 | founder = | seat_type = | seat = | government_footnotes = | governing_body = Adunarea Populară Supremă a Siliștei |leader_title = Președinte |leader_title1 = Vice Președinte |leader_name = Ștefan Marius Snagoveanu |leader_name1 = David Robert Mihnevici |leader_name2 =Albert Henry Jinga |leader_title2= Prime Ministru | unit_pref = Metric<!-- or US or UK --> | area_footnotes = | area_total_km2 = 12.56 | area_land_km2 = 11.27 | area_water_km2 = 1.29 | area_water_percent = | area_note = | elevation_footnotes = | elevation_max_m = 100 | elevation_min_m = 86 | elevation_m = 93 | population_footnotes = | population_total = 2398 | population_as_of = 2022 | population_density_km2 = auto | population_demonym = Siliștean | population_rank = 3rd | population_note = | timezone1 = [[w:Eastern European Time|EET]] | utc_offset1 = +2 | timezone1_DST = [[w:Eastern European Summer Time|EEST]] | utc_offset1_DST = +3 | postal_code_type = |registration_plate = SIL | postal_code = | area_code_type = | area_code = | iso_code = | website = <!-- {{URL|example.com}} --> | footnotes = }} {{WIP}} {{Snagov-stub}} [[File:Artistic representaiton of pre-human settlement Siliștea.png|220px|thumb|right|Reprezentare artistică a Siliștei, înainte de a fi populată de oameni]] '''Siliștea''' (Snagovian: ''Сйлйштєа'') is a village in the [[Snagovian Federation]]. It has been the de jure capital of the state since its [[Snagovian Declaration of National Rebirth|foundation on 18 June 2020]]. As of 2011, Siliștea has a population of 2398 people, majority of whom are ethnic Snagovians, with a notable minority of [[w:Romani people|Cygans]], especially in the Opașkele raion. Like neighbouring villages, Siliștea has been inhabited by humans since the [[w:Neolithic|Neolithic]]. [[w:Slavic people|Slavs]] settled in the area in the 7th century, and as time went on, multiple smaller villages existed before they united in 1964 to form Siliștea. Those villages were: Opașkele, Ribari, Antim Ivireanu, and Turbați. All of these are now raions of the united Siliștean village. [[Categorie:Snagov]] 650e73ef9c8c9356e42e4028e2a0b814f492dbc4 3 2 2022-07-27T14:46:16Z StefanSNG 11599 wikitext text/x-wiki {{Infobox settlement <!-- See Template:Infobox settlement for additional fields and descriptions --> | name = Siliștea | native_name = Сйлйштєа | native_name_lang = | settlement_type = Village | image = {{photo montage |position = center | photo1a = Siliștea photo 1.png | photo2a = Snagov Monastery photo 1.jpg | photo2b = Siliștea photo 2.jpg | photo3a = Snagovian_People's_House_-_Photo_2.jpg | size = 250 | color = transparent | text = <center>From left to right: Antim Ivireanu raion, [[w:ro:Mănăstirea Snagov|Snagov Monastery]], [[w:Lake Snagov|Lake Snagov]], [[w:ro:Palatul Snagov|Snagovian People's House]]<center> | border = 0 }} | image_alt = | image_flag = Flag of Siliștea.svg | flag_size = 100px | flag_alt = | image_seal = | seal_alt = | image_shield = Coat of arms of Siliștea.svg | shield_size = 100px | shield_alt = | anthem = Рѡдйна наша-й мѫндра Сйлйштє <br><small>''Patria noastră-i mândra Siliște''<br><small>[[File:Rodina nașa-i mândra Siliște - Instrumental 1.ogg]] | nickname = | motto = Славъ вєшнйкъ <br> <small> ''Glorie eternă'' <small> | image_map = Siliștea in Snagov - map.svg | map_alt = | map_caption = Siliștea (roșu) în Snagov (gri deschis) | pushpin_map = | pushpin_label_position = | pushpin_map_alt = | pushpin_map_caption = | latd = |latm = |lats = |latNS = | longd = |longm = |longs = |longEW = | coor_pinpoint = | coordinates_type = | coordinates_display = inline,title | coordinates_footnotes = | subdivision_type = Țara | subdivision_name = [[File:Flag of Snagov.svg|22px]] [[Snagov]] | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | subdivision_type3 = | subdivision_name3 = | established_title = Unirea Silișteană | established_date = 1964 | founder = | seat_type = | seat = | government_footnotes = | governing_body = Adunarea Populară Supremă a Siliștei |leader_title = Președinte |leader_title1 = Vice Președinte |leader_name = Ștefan Marius Snagoveanu |leader_name1 = David Robert Mihnevici |leader_name2 =Albert Henry Jinga |leader_title2= Prime Ministru | unit_pref = Metric<!-- or US or UK --> | area_footnotes = | area_total_km2 = 12.56 | area_land_km2 = 11.27 | area_water_km2 = 1.29 | area_water_percent = | area_note = | elevation_footnotes = | elevation_max_m = 100 | elevation_min_m = 86 | elevation_m = 93 | population_footnotes = | population_total = 2398 | population_as_of = 2022 | population_density_km2 = auto | population_demonym = Siliștean | population_rank = 3rd | population_note = | timezone1 = [[w:Eastern European Time|EET]] | utc_offset1 = +2 | timezone1_DST = [[w:Eastern European Summer Time|EEST]] | utc_offset1_DST = +3 | postal_code_type = |registration_plate = SIL | postal_code = | area_code_type = | area_code = | iso_code = | website = <!-- {{URL|example.com}} --> | footnotes = }} {{WIP}} {{Snagov-stub}} [[File:Artistic representaiton of pre-human settlement Siliștea.png|220px|thumb|right|Reprezentare artistică a Siliștei, înainte de a fi populată de oameni]] '''Siliștea''' (Snagoveană: ''Сйлйштєа'') este un sat în Federația Snagoveană. Este capitala de jure a statului încă de la semnarea Declarației Snagovene a Învierii Naționale pe 18 Iunie 2020. În 2011, Siliștea avea o populație de 2398 de persoane, majoritatea fiind Snagoveni etnici, cu o minoritate considerabilă de țigani, mai ales în raionul Opașkele. Ca satele din vecinătate, Siliștea a fost locuită de oameni încă din Neolitic. Slavii s-au stabilit în zonă în secolul 7, și cum a trecut timpul, mai multe sate mici au ieșit la iveală, până când in 1964 acestea s-au unit pentru a creea Siliștea cum o știm în ziua de azi. Satele acelea erau: Opașkele, Ribari, Antim Ivireanu, and Turbați. Toate acestea sunt acum raioane în satul unit Siliștean. [[Categorie:Snagov]] 87be64cfb89b5c4276187b23fed12d3556241e49 Format:Snagov-stub 10 3 4 2022-07-27T14:49:22Z StefanSNG 11599 Pagină nouă: {{asbox | image = Flag map of Snagov.svg | pix = 50 | subject = Snagovean | qualifier = | category = | category1 = | tempsort = | name = Format:Snagov-stub }}<noinclude>[[Categorie:Snagov]][[Category:Nation stub templates|{{PAGENAME}}]]<noinclude/> wikitext text/x-wiki {{asbox | image = Flag map of Snagov.svg | pix = 50 | subject = Snagovean | qualifier = | category = | category1 = | tempsort = | name = Format:Snagov-stub }}<noinclude>[[Categorie:Snagov]][[Category:Nation stub templates|{{PAGENAME}}]]<noinclude/> 34ef6af4e7e9f3258a180b2722f552aa38447b61 Format:Asbox 10 4 5 2022-07-27T14:50:09Z StefanSNG 11599 Pagină nouă: <includeonly>{{#invoke:Asbox|main}}</includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis to Wikidata. --> </noinclude> wikitext text/x-wiki <includeonly>{{#invoke:Asbox|main}}</includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis to Wikidata. --> </noinclude> b20553d60f223a0f36a3089524989e235d379b74 Modul:Asbox 828 5 6 2022-07-27T14:51:49Z StefanSNG 11599 Pagină nouă: --[[ This module was created by User:CodeHydro (Alexander Zhikun He). User:Jackmcbarn and User:Mr._Stradivarius provided a great deal of assistance in writting p.main() p.main() draw heavily from the following version of Template:Asbox of the English Wikipedia, authored primarily by User:Rich_Farmbrough https://en.wikipedia.org/w/index.php?title=Template:Asbox&oldid=619510287 p.templatepage() is derived from the following revision of Template:Asbox/templatepage, authored pr... Scribunto text/plain --[[ This module was created by User:CodeHydro (Alexander Zhikun He). User:Jackmcbarn and User:Mr._Stradivarius provided a great deal of assistance in writting p.main() p.main() draw heavily from the following version of Template:Asbox of the English Wikipedia, authored primarily by User:Rich_Farmbrough https://en.wikipedia.org/w/index.php?title=Template:Asbox&oldid=619510287 p.templatepage() is derived from the following revision of Template:Asbox/templatepage, authored primarily by User:MSGJ https://en.wikipedia.org/w/index.php?title=Template:Asbox/templatepage&oldid=632914791 Both templates had significant contributions from numerous others listed in the revision history tab of their respective pages. --]] local WRAPPER_TEMPLATE, args = 'Template:Asbox' local templatestyles = 'Asbox/styles.css' local p, Buffer, stubCats = { --Prevents dupli-cats... get it? Maybe not? cats = setmetatable({}, {__newindex = function(t, i, v) if not rawget(t, i) then rawset(t, i, v) table.insert(t, i) end end}), --initializes variables required by both p.main and p.templatepage init = function(self, frame, page) args, page = args or require('Module:Arguments').getArgs(frame, { wrappers = WRAPPER_TEMPLATE }), page or mw.title.getCurrentTitle() --Ensures demo parameter will never affect category() output for articles self.demo = self.demo or page.namespace ~= 0 and args.demo return args, page end }, require('Module:Buffer') --[[ Formats category links. Stores them until called with cat.done=true Takes multiple or single categories in the form of 'cat' or a table of strings and/or tables containing parts. (See below) ]] local attention, catTag, catKey = Buffer'Stub message templates needing attention', '[[Category:%s]]', '%s|%s%s' local function category(cat) for _, v in ipairs((tostring(cat) == cat or cat.t) and {cat} or cat) do --[[ If v is a table: [1] = full category name; defaults to local attention if blank k = Category sort key. Prefix before v.t t = page.text or args.tempsort#; appended after k (or in its place if omitted). Required if v is not a string Basically the same as v = (v[1] or attention) .. ' | ' .. (v.k or '') .. v.t ]] if v and v ~= true then--reject v = nil, false, or true p.cats[catTag:format(tostring(v) == v and v or (v[1] and Buffer(v[1]) or attention):_in(v.k):_(v.t):_str(2, nil, nil, '|') )] = true end end return cat.done and table.concat(p.cats, p.demo and ' | ' or nil) or '' end --[[ Makes an ombox warning; Takes table {ifNot = Boolean, text, {cat. sort key, cat. sort name}} Will return an empty string instead when ifNot evaluates to true ]] local function ombox(v) if v.ifNot then return end p.ombox = p.ombox or require('Module:Message box').ombox category{v[2]} return p.ombox{ type = 'content', text = v[1] } end --[[ Unlike original template, module now takes unlimited cats! This function also performs most stub category error checks except for the ombox for when main |category= is omitted (See p.template()) ]] local function catStub(page, pageDoc) stubCats = {missing = {}, v = {}} -- zwj and zwnj have semantical use in other other wikis, don't remove them local zwj = '\226\128\141' -- U+200D, E2 80 8D local zwnj = '\226\128\140' -- U+200C, E2 80 8C local disallowedUnicodeChars = '[^%w%p%s' .. zwj .. zwnj .. ']' -- for i18n we make this a separate string local code for k, _ in pairs(args) do --Find category parameters and store the number (main cat = '') table.insert(stubCats, string.match(k, '^category(%d*)$')) end table.sort(stubCats) for k, v in ipairs(stubCats) do --Get category names and, if called by p.templatepage, the optional sort key local tsort, cat = args['tempsort' .. v], mw.ustring.gsub(args['category' .. v], disallowedUnicodeChars, '')--remove all hidden unicode chars --Do not place template in main category if |tempsort = 'no'. However, DO place articles of that template in the main category. table.insert(stubCats.v, page and (--p.templatepage passes page; p.main does not, i.e. articles are categorized without sort keys. v=='' and tsort == 'no'--if true, inserts 'true' in table, which category() will reject or tsort and {cat, k = ' ', t = tsort} or {cat, k = ' *', t = page.text}--note space in front of sort key ) or cat ) --Check category existance only if on the template page (i.e. stub documentation) if page then if not mw.title.new('Category:' .. cat).exists then code = code or mw.html.create'code':wikitext'|category' table.insert(stubCats.missing, tostring(mw.clone(code):wikitext(v))) end --[[ Checks non-demo stub template for documentation and flags if doc is present. All stub cats names are checked and flagged if it does not match 'Category: [] stub'. The main stub cat is exempt from the name check if the stub template has its own doc (presumably, this doc would have an explanation as to why the main stub cat is non-conforming). ]] table.insert(stubCats.v, v == '' and not p.demo and pageDoc.exists and 'Stub message templates with documentation subpages' or not cat:match' stubs$' and {k = 'S', t = page.text} ) end end --Add category names after loop is completed category(stubCats.v) return #stubCats.missing > 0 and ombox{ --Changed, original msg: --One or more of the stub categories defined in this template do not seem to exist! --Please double-check the parameters {{para|category}}, {{para|category1}} and {{para|category2}}. 'The following parameter' .. (#stubCats.missing == 1 and ' defines a stub category that does' or 's define stub categories that do') .. ' not exist: ' .. mw.text.listToText(stubCats.missing), {k = 'N', t = page.text} } end --Shows population of categories found by catStub(). Outputs demo values if none local function population() local wikitext, base = {}, '* [[:Category:%s]] (population: %s)\n' if not args.category and stubCats[1] ~= false then table.insert(stubCats, 1, false) end for _, v in ipairs(stubCats) do table.insert(wikitext, base:format( v and args['category' .. v] or '{{{category}}}', v and mw.site.stats.pagesInCategory(args['category' .. v], 'all') or 0 )) end return table.concat(wikitext) end --Includes standard stub documention and flags stub templates with bad parameter values. function p.templatepage(frame, page) args, page = p:init(frame, page) local tStubDoc = mw.title.new'Template:Stub documentation' local pageDoc = page:subPageTitle('doc') --Reorganization note: Original Asbox alternates between outputting categories and checking on params |category#=. --Rather than checking multiple times and switching tasks, all stub category param operations have been rolled into catStub() return Buffer( ombox{--Show ombox warnings for missing args. ifNot = args.category, 'The <code>|category</code> parameter is not set. Please add an appropriate stub category.', {k = 'C', t = page.text} }) :_(ombox{ ifNot = args.subject or args.article or args.qualifier, 'This stub template contains no description! At least one of the parameters <code>|subject</code>, <code>|article</code> or <code>|qualifier</code> must be defined.', {k = 'D', t = page.text} }) :_(catStub(page, pageDoc))--catStub() may also return an ombox if there are non-existing categories :_(category{ done = p.demo ~= 'doc',--Outputs categories if not doc demo 'Stub message templates', args.icon and 'Stub message templates using icon parameter' or args.image and ( mw.title.new('Media:' .. mw.text.split(args.image, '|')[1]).exists--do nothing if exists. category() will reject true or {k = 'B', t = page.text} ) or 'Stub message templates without images', args.imagealt and {k = 'I', t = page.text}, }) :_((not p.demo or p.demo == 'doc') and--Add standard stub template documentation require('Module:Documentation').main{ content = Buffer(page.text ~= 'Stub' and--This comparison performed in {{Asbox/stubtree}} before it invokes Module:Asbox stubtree require('Module:Asbox stubtree').subtree{args = {pagename = page.text}} ) :_in'\n== About this template ==\nThis template is used to identify a':_(args.subject):_'stub':_(args.qualifier):_out' '--space :_'. It uses {{[[Template:Asbox|asbox]]}}, which is a meta-template designed to ease the process of creating and maintaining stub templates.\n=== Usage ===\nTyping ' :_(mw.html.create'code' :wikitext('{{', page.text == 'Stub' and 'stub' or page.text, '}}') ) :_' produces the message shown at the beginning, and adds the article to the following categor' :_(#stubCats > 1 and 'ies' or 'y') :_':\n' :_(population()) :_(pageDoc.exists and--transclusion of /doc if it exists frame:expandTemplate{title = pageDoc.text} ) :_'\n== General information ==\n' :_(frame:expandTemplate{title = tStubDoc.text}) :_'\n\n'(), ['link box'] = Buffer'This documentation is automatically generated by [[Module:Asbox]].' :_in'The general information is transcluded from [[Template:Stub documentation]]. ' :_(mw.html.create'span' :cssText'font-size:smaller;font-style:normal;line-height:130%' :node(('([%s edit] | [%s history])'):format( tStubDoc:fullUrl('action=edit', 'relative'), tStubDoc:fullUrl('action=history', 'relative') )) ) :_out() :_(page.protectionLevels.edit and page.protectionLevels.edit[1] == 'sysop' and "This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] should be added to the template's [" .. pageDoc:fullUrl('action=edit&preload=Template:Category_interwiki/preload', 'relative') .. '| /doc] subpage, which is not protected.' )' <br/>' } )() end function p.main(frame, page) args, page = p:init(frame, page) local output = mw.html.create'div' :attr{role = 'note'} :addClass'metadata plainlinks asbox stub' :tag'table' :attr{role = 'presentation'} :tag'tr' :addClass'noresize' :node((args.icon or args.image) and mw.html.create'td' :wikitext(args.icon or ('[[File:%s|%spx|alt=%s]]'):format( args.image or '', args.pix or '40x30', args.imagealt or 'Stub icon' )) ) :tag'td' :tag'p' :addClass'asbox-body' :wikitext( Buffer'This':_(args.subject):_(args.article or 'article'):_(args.qualifier)' ',--space ' is a [[MicroWiki:stub|stub]]. You can help MicroWiki by [', page:fullUrl('action=edit', 'relative'), ' expanding it].' ) :done() :node(args.note and mw.html.create() :tag'p' :addClass'asbox-note' :wikitext(args.note) :done() ) :allDone() :node(args.name and require'Module:Navbar'._navbar{ args.name, mini = 'yes', } ) --[[ Stub categories for templates include a sort key; this ensures that all stub tags appear at the beginning of their respective categories. Articles using the template do not need a sort key since they have unique names. When p.demo equals 'doc', the demo stub categories will appear as those for a stub template. Otherwise, any non-nil p.demo will emulate article space categories (plus any error cats unless set to 'art') ]] if page.namespace == 0 then -- Main namespace category'All stub articles' catStub() elseif p.demo then if p.demo ~= 'doc' then catStub() end --Unless p.demo is set to 'art', it will also include error categories normally only shown on --the template but not in the article. The elseif after namespace == 0 means demo cats will never show in article space. p.demodoc = p.demo ~= 'art' and p.templatepage(frame, page) output = mw.html.create() :node(output) :tag'small':wikitext( 'Demo categories: ', (category{done = true}:gsub('(%[%[)(Category:)([^|%]]-)(%|)', '%1%2%3|%2%3%4'):gsub('(%[%[)(Category:)', '%1:%2')) ):done() :wikitext(p.demo == 'doc' and p.demodoc or nil) else --Checks for valid name; emulates original template's check using {{FULLPAGENAME:{{{name|}}}}} local normalizedName = mw.title.new(args.name or '') if normalizedName and normalizedName.fullText == page.fullText then output = mw.html.create():node(output):wikitext(p.templatepage(frame, page)) elseif not page.isSubpage and page.namespace == 10 then-- Template namespace and not a subpage category{{k = args.name and 'E' or 'W', t = page.text}} end end return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles} } .. tostring(output:wikitext(not p.demo and category{done = true} or nil)) end return p 1d0684955d037ed27f56dca7dcc0ddd9e0204d4e Format:WIP 10 6 7 2022-07-27T14:52:37Z StefanSNG 11599 Pagină nouă: {{mbox | type = notice | image = {{#if:{{{altimage|}}}|{{{altimage|}}}|[[File:WIP.png|50px|link=]]}} | text = This {{#switch:{{NAMESPACE}} | Talk = talk page | Category = category page | Help = help page | Template = template page | User = user page | User talk = user talk page | MicroWiki = project page | MicroWiki talk = project talk page | article or section }} '''is in the middle of an expansion or major restructuring{... wikitext text/x-wiki {{mbox | type = notice | image = {{#if:{{{altimage|}}}|{{{altimage|}}}|[[File:WIP.png|50px|link=]]}} | text = This {{#switch:{{NAMESPACE}} | Talk = talk page | Category = category page | Help = help page | Template = template page | User = user page | User talk = user talk page | MicroWiki = project page | MicroWiki talk = project talk page | article or section }} '''is in the middle of an expansion or major restructuring{{#if:{{{notready|}}}|, and is not yet ready for use|}}.''' You are welcome to assist in its construction by editing it as well. {{#if:{{{placedby|}}}|This template was placed by {{#ifeq:{{lcfirst:{{{placedby}}}}}|{{ucfirst:{{{placedby}}}}}|<!--{{{placedby}}} does not start with a letter - so is probably a signature-->{{{placedby}}}|{{user|{{{placedby}}}}}}}.}} If this article <span class="plainlinks">[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}}</span> has not been edited in several days], please remove this template.}}{{#if:{{{comment|}}}|{{mbox | type = notice | image = none | text = '''Contributor note''': {{{comment}}} }} }}<noinclude> ==Usage notes== *Please continue to actively edit articles the WIP template is used on. *The WIP template does not make an article immune to deletion or other quality control processes, especially if it has not been edited for days. [[Category:Templates|{{PAGENAME}}]] [[Category:Message boxes|{{PAGENAME}}]]</noinclude> 36828a997c94de089a14ea31d5ec60051f9dd8d2 Format:Mbox 10 7 8 2022-07-27T14:52:58Z StefanSNG 11599 Pagină nouă: {{ {{namespace detect | demospace = {{{demospace|}}} | main = ambox | talk = tmbox | file = imbox | category = cmbox | other = ombox }} | type = {{{type|}}} | image = {{{image|}}} | imageright = {{{imageright|}}} | style = {{{style|}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | text-alt = {{{text-alt}}} | small = {{{small|}}} | smallimage = {{{smallimage|}}} | smallimageright = {{{smallimageright|}}}... wikitext text/x-wiki {{ {{namespace detect | demospace = {{{demospace|}}} | main = ambox | talk = tmbox | file = imbox | category = cmbox | other = ombox }} | type = {{{type|}}} | image = {{{image|}}} | imageright = {{{imageright|}}} | style = {{{style|}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | text-alt = {{{text-alt}}} | small = {{{small|}}} | smallimage = {{{smallimage|}}} | smallimageright = {{{smallimageright|}}} | smalltext = {{{smalltext|}}} }}<noinclude>[[Category:Templates|{{PAGENAME}}]] [[Category:Message boxes|{{PAGENAME}}]]</noinclude> f56dfd86585bcef22a5c46206ff049ff902f04a5 Format:Namespace detect 10 8 9 2022-07-27T14:54:11Z StefanSNG 11599 Pagină nouă: {{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{{demospace}}} | {{#if:{{{page|}}} | <!--Detect the namespace in the "page" parameter--> {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | talk | {{SUBJECTSPACE:{{{page}}} }} }} | <!--No "demospace" or "page" parameters, so detect actual namespace-->... wikitext text/x-wiki {{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{{demospace}}} | {{#if:{{{page|}}} | <!--Detect the namespace in the "page" parameter--> {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | talk | {{SUBJECTSPACE:{{{page}}} }} }} | <!--No "demospace" or "page" parameters, so detect actual namespace--> {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | {{SUBJECTSPACE}} }} }} }} }} <!-- Only one of the lines below will be executed --> <!-- Respecting empty parameters on purpose --> | main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""--> | = {{{main| {{{other|}}} }}} | talk = {{{talk| {{{other|}}} }}} | user = {{{user| {{{other|}}} }}} | wikipedia = {{{wikipedia| {{{other|}}} }}} | file | image = {{{file| {{{image| {{{other|}}} }}} }}} | mediawiki = {{{mediawiki| {{{other|}}} }}} | template = {{{template| {{{other|}}} }}} | help = {{{help| {{{other|}}} }}} | category = {{{category| {{{other|}}} }}} | portal = {{{portal| {{{other|}}} }}} | book = {{{book| {{{other|}}} }}} | other | #default = {{{other|}}} <!--"demospace=other" or a new namespace--> }}<!--End switch--><noinclude>[[Category:Templates]]</noinclude> 31a5080beeca48b99d4ea90a8cba927a22f48dbd Format:Ombox 10 9 10 2022-07-27T14:54:52Z StefanSNG 11599 Pagină nouă: {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Modul:Message box 828 10 11 2022-07-27T14:55:32Z StefanSNG 11599 Pagină nouă: -- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('Module:No globals') local getArgs local yesno = require('Module:Yesno') -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', ima... Scribunto text/plain -- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('Module:No globals') local getArgs local yesno = require('Module:Yesno') -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'>''(<span class='date'>%s</span>)''</span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell if cfg.imageEmptyCellStyle then self.imageEmptyCellStyle = 'border:none;padding:0;width:1px' end -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places -- TODO: Add each template's stylesheet, waiting on [[MediaWiki talk:Common.css/to do]] local frame = mw.getCurrentFrame() -- we'll need this unconditionally for the TODO if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):css('width', '52px') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') :cssText(self.imageEmptyCellStyle or nil) end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):css('width', '52px') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :css('text-align', 'center') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) b6481f9044d5251ca5426b6984edd8909b56594c Modul:No globals 828 11 12 2022-07-27T14:56:57Z StefanSNG 11599 Pagină nouă: local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) 8ce3969f7d53b08bd00dabe4cc9780bc6afd412a Format:Ambox 10 12 13 2022-07-27T14:59:26Z StefanSNG 11599 Pagină nouă: {{#invoke:Message box|ambox}}{{#ifeq:{{{small}}};{{NAMESPACENUMBER}}|left;0|[[Category:Articles using small message boxes]]}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> wikitext text/x-wiki {{#invoke:Message box|ambox}}{{#ifeq:{{{small}}};{{NAMESPACENUMBER}}|left;0|[[Category:Articles using small message boxes]]}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0c13ec156138ae0499c998cc3d7fbbeac4aeeed6 Modul:Yesno 828 13 14 2022-07-27T14:59:53Z StefanSNG 11599 Pagină nouă: -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'tr... Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Utilizator:Kalyroon22 2 15 18 2022-11-03T14:18:24Z Kalyroon22 55678 +PU wikitext text/x-wiki [[File:Bandiera Territorio Libero di Milazzo.png|thumb|center|300px|<center>'''Sunt un micronaționalist sicilian din Comunitatea Surzilor'''</center>]] 5810992f4f46b103d0a82904b0ac867c576f6cd3 21 18 2023-09-10T21:02:14Z Kalyroon22 55678 +PU wikitext text/x-wiki [[File:Bandiera Territorio Libero di Milazzo.png|thumb|center|300px|<center>'''Sunt un micronaționalist sicilian din Comunitatea Surzilor'''</center>]] [[File:DeafFlag404.jpg|thumb|center|300px|<center>'''<big><big><big>Primo Segretario del DeafMicronation</big></big></big>'''</center>]] 3cf847b7504a0c36a19585ac8b6a2271bd6c6541 Categorie:Snagov 14 16 20 2023-06-23T17:42:36Z Ayunipear 59473 Creat o pagină goală wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709